<template>
	<view @click="toZhiwei">
		<view class="itemZhaop">
			<view style="width: 70%;">
				<view class="nameZP">{{list.postName}}</view>
				<view class="gongsi">{{list.customerName}}
					<span class="shu_xian_span">|</span>
					{{list.settlementType}}
				</view>
				<view class="gongsi">地址：{{list.address}}</view>
				<!-- <view class="gongsi">20km</view> -->
				<!-- <view class="pic">
					<u--image shape="circle" :showLoading="true" src="http://gips3.baidu.com/it/u=3886271102,3123389489&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960" width="30px"
						height="30px"></u--image>
				</view> -->
			</view>
			<view style="width: 30%;margin-top: 40rpx;">
				
				<view class="money">{{list.salaryRange}}</view>
				<view class="need">需{{list.demandQuantity}}人</view>
				<view class="need">{{list.status}}</view>
				<u-button v-if="showBtn" @click.stop="recommendJob" style="width:160rpx;text-align: center;"
					color="#44af85" text="推荐岗位"></u-button>

			</view>
		</view>
		<!-- <view class="divider"></view> -->

	</view>
</template>

<script>
	import list from '../../../uni_modules/uview-ui/libs/config/props/list';
	// import {addTask} from '@/api/talent/talent'

	export default {
		name: 'm-position',
		props: {
			showBtn: {
				default: false
			},
			list: Object
		},
		components: {

		},
		data() {
			return {
				resumeObject: Object
			};
		},
		mounted() {
			this.resumeObject = this.$props.list
			console.log(this.resumeObject,"resumeObject")
		},
		methods: {
			async recommendJob() {
				uni.showToast({
					title: '推荐成功',
					icon: 'none'
				});
			},
			toZhiwei() {
				if(this.showBtn) return
				uni.navigateTo({
					//传对象写法
					url:'/pages/zhiwei/zhiwei?resumeObject='+encodeURIComponent(JSON.stringify(this.resumeObject))
					//传单值
					// url: `/pages/zhiwei/zhiwei?postId=${this.resumeObject.id}`
				})
			}
		}
	};
</script>

<style lang="scss">
	.shu_xian_span {
		font-size: 30rpx;
		font-weight: 600;
		margin-left: 20rpx;
		margin-right: 20rpx;
	}

	.itemZhaop {
		display: flex;
		background-color: #fff;
		border-radius: 12rpx;
		padding: 30rpx;
		margin-bottom: 10rpx;
		// margin-left: 10rpx;
		// margin-right: 10rpx;
		justify-content: space-between;
	}
	

	.nameZP {
		font-size: 40rpx;
		color: #323232;
		padding: 8rpx 0;
		font-weight: 600;
		padding-top: 30rpx;
		margin-bottom: 16rpx;

	}

	.gongsi {
		font-size: 28rpx;
		color: #717171;
		padding: 10rpx 0;
	}

	.money {
		font-size: 40rpx;
		padding: 8rpx 0;
		color: #31a889;
		text-align: right;
		font-weight: 600;
	}

	.need {
		font-size: 26rpx;
		color: #717171;
		padding: 8rpx 0;
		text-align: right;
	}

	.divider {
		width: 100%;
		height: 6rpx;
		background-color: #eee;
		margin-top: 48rpx;

	}

	.pic {
		margin-top: 20rpx;
	}
</style>